//
//  JMPHttpRequest.h
//  qwm
//
//  Created by kevin on 2023/3/23.
//
#import <Foundation/Foundation.h>

#define JMPRequestDefaultTimeoutInterval                30

typedef NS_ENUM(NSInteger, JMP_HTTP_METHOD) {
    JMP_HTTP_METHOD_GET,
    JMP_HTTP_METHOD_POST,
    JMP_HTTP_METHOD_POST_JSON,
    JMP_HTTP_METHOD_PUT_JSON,
    JMP_HTTP_METHOD_DELETE_JSON
};

@interface JMPHttpRequest : NSObject

-(instancetype) initWithUrl:(NSString*) url;
-(instancetype) initWithUrl:(NSString *)url params:(NSDictionary*) params;

/**
 @author wjd
 
 @brief 请求路径
 */
@property (nonatomic, strong) NSString          *url;

/**
 @author wjd
 
 @brief http头域参数
 */
@property (nonatomic, strong) NSDictionary      *headers;

/**
 @author wjd
 
 @brief 请求参数
 */
@property (nonatomic, strong) NSDictionary      *params;

/**
 @author wjd
 
 @brief  方法
 */
@property (nonatomic, assign) JMP_HTTP_METHOD   method;

/**
 @author wjd
 
 @brief 超时时间，默认 JMPRequestDefaultTimeoutInterval
 */
@property (nonatomic, assign) int               timeoutInterval;

@end

